Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Vertex Attribute Set Lists

Labels

ASCII
VertexAttributeSetList
Binary
vasl ( = 0x7661736C )

Data Format

Uns32               nObjects
PackingEnum         packing
Uns32               nIndices
Uns                 indices[nIndices]
nObjects
The number of vertices of the parent geometric object.
packing
See "Face Attribute Set Lists" , for a complete explanation of this field.
nIndices
Size of the following array. See "Face Attribute Set Lists" , for a complete explanation of this field.
indices[]
An array of vertex indices. See "Face Attribute Set Lists" , for a complete explanation of this field.

Data Size

16 + nIndices * sizeof(Uns) + padding

Description

A vertex attribute set list is used to assign sets of attributes separately and selectively to the vertices of a verticed geometric object. Among the primitive metafile geometric objects, the following have vertices: general polygons, lines, meshes, polygons, polylines, triangles, and trigrids.

The index used to enumerate the vertices of an object of one of these types is described in the section on objects of that type. To recapitulate, in all cases the vertices are enumerated in the order of their occurrence in the specification of the parent geometric object. In the case of a general polygon, the index does not distinguish between contours.

Parent Hierarchy

Data, attribute set list.

Parent Objects

General polygon, line, mesh, polygon, polyline, triangle, trigrid. A vertex attribute set list always has a parent object.

Child Objects

Attribute sets (required). See "Face Attribute Set Lists" , for a complete explanation of how child objects are correlated with aspects of the parent geometric object.

Example

Container (
    GeneralPolygon (                # parent geometric object
        2                           # nContours
        #contour 0
        3                           # nVertices, contour 0
        -1 0 0                      # vertex 0
        1 0 0                       # vertex 1
        0 1.7 0                     # vertex 2
        #contour 1
        3                           # nVertices, contour 1
        -1 0.4 0                    # vertex 3
        1 0.4 0                     # vertex 4
        0 2.1 0                     # vertex 5
    )
    Container (
        VertexAttributeSetList ( 6 Exclude 2 0 4 )          # set list
        Container (                                         # child objects
            AttributeSet ( )                    # vertex 1 (contour 0)
            DiffuseColor ( 0 0 1 )
        )
        Container (
            AttributeSet ( )                    # vertex 2 (contour 0)
            DiffuseColor ( 0 1 1 )
        )
        Container (
            AttributeSet ( )                    # vertex 3 (contour 1)
            DiffuseColor ( 1 0 1 )
        )
        Container (
            AttributeSet ( )                    # vertex 5 (contour 1)
            DiffuseColor ( 1 1 0 )
        )
    )
    Container (
        AttributeSet ( )
        DiffuseColor ( 1 1 1 )
    )
)

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |